<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>dev: dev::net::EventLoop Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">dev
   &#160;<span id="projectnumber">0.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classdev_1_1net_1_1_event_loop.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classdev_1_1net_1_1_event_loop-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">dev::net::EventLoop Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>事件循环  
 <a href="classdev_1_1net_1_1_event_loop.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_event_loop_8hpp_source.html">EventLoop.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for dev::net::EventLoop:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classdev_1_1net_1_1_event_loop.png" usemap="#dev::net::EventLoop_map" alt=""/>
  <map id="dev::net::EventLoop_map" name="dev::net::EventLoop_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a48a02756ae182b1e704e6e33350a9025"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a48a02756ae182b1e704e6e33350a9025"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>Status</b> { <b>READY</b>, 
<b>RUNNING</b>, 
<b>EXITING</b>, 
<b>EXIT</b>
 }<tr class="separator:a48a02756ae182b1e704e6e33350a9025"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
<tr class="memitem:aa6a61f420ff2236c2f039cfa35c49c08"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6a61f420ff2236c2f039cfa35c49c08"></a>
typedef boost::function&lt; void(<a class="el" href="classdev_1_1net_1_1_socket.html">Socket</a> *)&gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PassSocketPointerCB</b></td></tr>
<tr class="separator:aa6a61f420ff2236c2f039cfa35c49c08"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adaa82e1b594ab036bf4a2fb0ebbf8482"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adaa82e1b594ab036bf4a2fb0ebbf8482"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>EventLoop</b> (<a class="el" href="classdev_1_1net_1_1_reactor.html">Reactor</a> *rector)</td></tr>
<tr class="separator:adaa82e1b594ab036bf4a2fb0ebbf8482"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabaaf8e05a0862f12d5ab65fcf772633"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aabaaf8e05a0862f12d5ab65fcf772633"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#aabaaf8e05a0862f12d5ab65fcf772633">run</a> (void)</td></tr>
<tr class="memdesc:aabaaf8e05a0862f12d5ab65fcf772633"><td class="mdescLeft">&#160;</td><td class="mdescRight">执行事件循环 <br /></td></tr>
<tr class="separator:aabaaf8e05a0862f12d5ab65fcf772633"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2115323b7b33ddab22e986c64c2741a8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2115323b7b33ddab22e986c64c2741a8"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#a2115323b7b33ddab22e986c64c2741a8">stop</a> (void)</td></tr>
<tr class="memdesc:a2115323b7b33ddab22e986c64c2741a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">停止事件循环 <br /></td></tr>
<tr class="separator:a2115323b7b33ddab22e986c64c2741a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a065de9a81bafe581317bd49536afbf6a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#a065de9a81bafe581317bd49536afbf6a">queueEvent</a> (boost::function&lt; void(void)&gt; handler)</td></tr>
<tr class="memdesc:a065de9a81bafe581317bd49536afbf6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">在事件循环执行这个函数  <a href="#a065de9a81bafe581317bd49536afbf6a">More...</a><br /></td></tr>
<tr class="separator:a065de9a81bafe581317bd49536afbf6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6a263ce319c3be4036cc621d3a4e254"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#ac6a263ce319c3be4036cc621d3a4e254">addSocket</a> (<a class="el" href="classdev_1_1net_1_1_socket.html">Socket</a> *sock, Reactor::EventType events, <a class="el" href="classdev_1_1net_1_1_socket_event_handler.html">SocketEventHandler</a> *handler)</td></tr>
<tr class="memdesc:ac6a263ce319c3be4036cc621d3a4e254"><td class="mdescLeft">&#160;</td><td class="mdescRight">绑定套接字到事件循环，事件循环会负责检查这个套接字上的事件并派发  <a href="#ac6a263ce319c3be4036cc621d3a4e254">More...</a><br /></td></tr>
<tr class="separator:ac6a263ce319c3be4036cc621d3a4e254"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab198f9ccb0bdd9722e300970ba522371"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#ab198f9ccb0bdd9722e300970ba522371">removeSocket</a> (<a class="el" href="classdev_1_1net_1_1_socket.html">Socket</a> *sock)</td></tr>
<tr class="memdesc:ab198f9ccb0bdd9722e300970ba522371"><td class="mdescLeft">&#160;</td><td class="mdescRight">从事件循环移除这个套接字  <a href="#ab198f9ccb0bdd9722e300970ba522371">More...</a><br /></td></tr>
<tr class="separator:ab198f9ccb0bdd9722e300970ba522371"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afeeb886d08c61f513723581a4462c7a7"><td class="memItemLeft" align="right" valign="top">Status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#afeeb886d08c61f513723581a4462c7a7">getStatus</a> (void) const </td></tr>
<tr class="memdesc:afeeb886d08c61f513723581a4462c7a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取事件循环状态  <a href="#afeeb886d08c61f513723581a4462c7a7">More...</a><br /></td></tr>
<tr class="separator:afeeb886d08c61f513723581a4462c7a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cc34cdad07de13a6612fdc7dd660cbf"><td class="memItemLeft" align="right" valign="top">ReactorPtr &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#a3cc34cdad07de13a6612fdc7dd660cbf">getReactor</a> (void)</td></tr>
<tr class="memdesc:a3cc34cdad07de13a6612fdc7dd660cbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取事件循环的网络反应器  <a href="#a3cc34cdad07de13a6612fdc7dd660cbf">More...</a><br /></td></tr>
<tr class="separator:a3cc34cdad07de13a6612fdc7dd660cbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c0413d7e832d1da05e0a19d2c0b3d59"><td class="memItemLeft" align="right" valign="top">base::mtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#a5c0413d7e832d1da05e0a19d2c0b3d59">getFrameTime</a> (void) const </td></tr>
<tr class="memdesc:a5c0413d7e832d1da05e0a19d2c0b3d59"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取事件循环的帧时间  <a href="#a5c0413d7e832d1da05e0a19d2c0b3d59">More...</a><br /></td></tr>
<tr class="separator:a5c0413d7e832d1da05e0a19d2c0b3d59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d109507f05fa7e25e25c8786c765daf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#a0d109507f05fa7e25e25c8786c765daf">setFrameTime</a> (base::mtime_t time)</td></tr>
<tr class="memdesc:a0d109507f05fa7e25e25c8786c765daf"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置事件循环的帧时间  <a href="#a0d109507f05fa7e25e25c8786c765daf">More...</a><br /></td></tr>
<tr class="separator:a0d109507f05fa7e25e25c8786c765daf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e1fef09fb4c03dd0ee629e700aa6e67"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#a8e1fef09fb4c03dd0ee629e700aa6e67">getId</a> (void) const </td></tr>
<tr class="memdesc:a8e1fef09fb4c03dd0ee629e700aa6e67"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取事件循环的ID  <a href="#a8e1fef09fb4c03dd0ee629e700aa6e67">More...</a><br /></td></tr>
<tr class="separator:a8e1fef09fb4c03dd0ee629e700aa6e67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a7dc03f144ed38d10b40547922501a3"><td class="memItemLeft" align="right" valign="top">unsigned long long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#a6a7dc03f144ed38d10b40547922501a3">getLoopCounter</a> (void) const </td></tr>
<tr class="memdesc:a6a7dc03f144ed38d10b40547922501a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取事件循环已经循环的次数  <a href="#a6a7dc03f144ed38d10b40547922501a3">More...</a><br /></td></tr>
<tr class="separator:a6a7dc03f144ed38d10b40547922501a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5e0b8420fd73e47c2b806135893abb7"><td class="memItemLeft" align="right" valign="top">base::mtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#ac5e0b8420fd73e47c2b806135893abb7">getFrameSystemTime</a> (void) const </td></tr>
<tr class="memdesc:ac5e0b8420fd73e47c2b806135893abb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取事件循环当前执行一帧消耗的时间  <a href="#ac5e0b8420fd73e47c2b806135893abb7">More...</a><br /></td></tr>
<tr class="separator:ac5e0b8420fd73e47c2b806135893abb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa12ef12c8efa905621d3f9d834cd1f19"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_event_loop.html#aa12ef12c8efa905621d3f9d834cd1f19">setRemoveSocketCallback</a> (PassSocketPointerCB callback)</td></tr>
<tr class="memdesc:aa12ef12c8efa905621d3f9d834cd1f19"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置事件循环套接字移除回调函数，当完成移除这个套接字时会调用  <a href="#aa12ef12c8efa905621d3f9d834cd1f19">More...</a><br /></td></tr>
<tr class="separator:aa12ef12c8efa905621d3f9d834cd1f19"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a0736aba6eec2f2c2a13494228473b67c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0736aba6eec2f2c2a13494228473b67c"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>TcpWorker</b></td></tr>
<tr class="separator:a0736aba6eec2f2c2a13494228473b67c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ecf3132e8c4bf890c07853cfab7619c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3ecf3132e8c4bf890c07853cfab7619c"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>TcpServer</b></td></tr>
<tr class="separator:a3ecf3132e8c4bf890c07853cfab7619c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>事件循环 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac6a263ce319c3be4036cc621d3a4e254"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EventLoop::addSocket </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdev_1_1net_1_1_socket.html">Socket</a> *&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Reactor::EventType&#160;</td>
          <td class="paramname"><em>events</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classdev_1_1net_1_1_socket_event_handler.html">SocketEventHandler</a> *&#160;</td>
          <td class="paramname"><em>handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>绑定套接字到事件循环，事件循环会负责检查这个套接字上的事件并派发 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>套接字指针 </td></tr>
    <tr><td class="paramname">events</td><td>注册到这个套接字的事件 </td></tr>
    <tr><td class="paramname">handelr</td><td>事件处理器 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac5e0b8420fd73e47c2b806135893abb7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">base::mtime_t dev::net::EventLoop::getFrameSystemTime </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取事件循环当前执行一帧消耗的时间 </p>
<dl class="section return"><dt>Returns</dt><dd>base::mtime_t </dd></dl>

</div>
</div>
<a class="anchor" id="a5c0413d7e832d1da05e0a19d2c0b3d59"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">base::mtime_t dev::net::EventLoop::getFrameTime </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取事件循环的帧时间 </p>
<dl class="section return"><dt>Returns</dt><dd>base::mtime_t </dd></dl>

</div>
</div>
<a class="anchor" id="a8e1fef09fb4c03dd0ee629e700aa6e67"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int dev::net::EventLoop::getId </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取事件循环的ID </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a class="anchor" id="a6a7dc03f144ed38d10b40547922501a3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long long dev::net::EventLoop::getLoopCounter </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取事件循环已经循环的次数 </p>
<dl class="section return"><dt>Returns</dt><dd>unsigned long long </dd></dl>

</div>
</div>
<a class="anchor" id="a3cc34cdad07de13a6612fdc7dd660cbf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ReactorPtr&amp; dev::net::EventLoop::getReactor </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取事件循环的网络反应器 </p>
<dl class="section return"><dt>Returns</dt><dd>ReactorPtr </dd></dl>

</div>
</div>
<a class="anchor" id="afeeb886d08c61f513723581a4462c7a7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Status dev::net::EventLoop::getStatus </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取事件循环状态 </p>
<dl class="section return"><dt>Returns</dt><dd>Status </dd></dl>

</div>
</div>
<a class="anchor" id="a065de9a81bafe581317bd49536afbf6a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EventLoop::queueEvent </td>
          <td>(</td>
          <td class="paramtype">boost::function&lt; void(void)&gt;&#160;</td>
          <td class="paramname"><em>handler</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>在事件循环执行这个函数 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handler</td><td>需要执行的函数 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab198f9ccb0bdd9722e300970ba522371"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void EventLoop::removeSocket </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classdev_1_1net_1_1_socket.html">Socket</a> *&#160;</td>
          <td class="paramname"><em>sock</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从事件循环移除这个套接字 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>套接字指针 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0d109507f05fa7e25e25c8786c765daf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void dev::net::EventLoop::setFrameTime </td>
          <td>(</td>
          <td class="paramtype">base::mtime_t&#160;</td>
          <td class="paramname"><em>time</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置事件循环的帧时间 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">time</td><td>帧时间 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa12ef12c8efa905621d3f9d834cd1f19"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void dev::net::EventLoop::setRemoveSocketCallback </td>
          <td>(</td>
          <td class="paramtype">PassSocketPointerCB&#160;</td>
          <td class="paramname"><em>callback</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置事件循环套接字移除回调函数，当完成移除这个套接字时会调用 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">callback</td><td>回调函数 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>dev/dev/net/<a class="el" href="_event_loop_8hpp_source.html">EventLoop.hpp</a></li>
<li>dev/src/net/EventLoop.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>dev</b></li><li class="navelem"><b>net</b></li><li class="navelem"><a class="el" href="classdev_1_1net_1_1_event_loop.html">EventLoop</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.10 </li>
  </ul>
</div>
</body>
</html>
